import React, {PureComponent} from 'react';
import {Input} from 'antd';
import PropTypes from 'prop-types';
import './WrappedInputVIN.css';
import TextInput from 'Shared/components/TextInput';
const splitWidth = {
    width: '20%',
    borderLeft: 0,
    borderRight: 0,
    pointerEvents: 'none'
};
// eslint-disable-next-line react/prefer-stateless-function
class WrappedInputVIN extends PureComponent {
    render() {
        const {style, name, value, onBlur} = this.props;
        return (
            <div className="site-input-group-wrapper">
                <Input.Group compact>
                    <TextInput
                        name={name[0]}
                        value={value[0]}
                        style={style}
                        onBlur={onBlur}
                        className="site-input-left"/>
                    <Input
                        className="site-input-split"
                        style={splitWidth}
                        placeholder="~"
                        disabled/>
                    <TextInput
                        name={name[1]}
                        value={value[1]}
                        style={style}
                        onBlur={onBlur}
                        className="site-input-right"/>
                </Input.Group>
            </div>
        );
    }
}
WrappedInputVIN.propTypes = {
    name: PropTypes.array, /*当前属性名数组*/
    style: PropTypes.object, /*样式*/
    value: PropTypes.array, /*当前值数组*/
    onBlur: PropTypes.func, /*失去焦点回调*/
};
export default WrappedInputVIN;
